import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import  mydialog from '@/components/mydialog'
import  firstlevel from '@/components/firstlevel'
import  jump from '@/components/jump'
import  activity from '@/components/activity'
import  home from '@/components/home/home'
import  child from '@/components/home/child/child'
import store from '@/components/store'
import store1 from '@/components/store1'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/store1',
      name:'store1',
      component:store1
    },
    {
      path:'/store',
      name:'store',
      component:store
    },
    {
      path: '/home',
      name: 'home',
      component: home,
      children:[
        {
          //在children中path/代表重新开始，如果不加/就是从刚刚开始．
          path:'/child',
          name:'child',
          component: child
        }
      ]
    },
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },{
      path:'/mydialog',
      name:'mydialog',
      component:mydialog
    }
    ,{
      path:"/firstlevel",
      component:firstlevel,
      name:'firstlevel'
    },
    {
      path:"/jump",
      component:jump,
      name:"jump"
    },
    {
      path:"/activity",
      component:activity,
      name:"activity"
    }
  ]
})
